package com.system.manager.modules.authorized.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.system.manager.modules.authorized.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yxp
 * @since 2021-10-18
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据登陆证号查找用户
     * @param userAccount
     * @return
     */
    User selectByAccount(String userAccount);

    /**
     * 根据条件查询出所有的对象
     * @param userPage
     * @param role
     * @param userAccount
     * @param name
     * @param phone
     * @return
     */
    List<User> selectUsersCondition(Page<User> userPage, @Param("role") Integer role, @Param("userAccount") String userAccount, @Param("name") String name, @Param("phone") String phone);

}
